﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using jcs.Core;

namespace jcs.Core.Tests
{
    /// <summary>
    /// Summary description for UnitTest1
    /// </summary>
    [TestClass]
    public class StingProviderTests
    {
        
        [TestMethod]
        public void StringIsOfLengthTests()
        {
            
            Assert.AreEqual(true, StringProvider.StringIsOfLength(0, "No", "No", "Yes", ""));
            Assert.AreEqual(false, StringProvider.StringIsOfLength(7, "No", "No", "Yes", ""));
        }

        [TestMethod]
        public void ConcentrateStringTests()
        {
            Assert.AreEqual("12345", StringProvider.ConcentrateString(new List<int> {1,2,3,4,5}));
            Assert.AreEqual("One;Two;Three;Four;Five", StringProvider.ConcentrateString(new List<string> {"One", "Two", "Three", "Four", "Five"}, ";"));
            Assert.AreEqual("1.232.343.45", StringProvider.ConcentrateString((new List<double> {1.23, 2.34, 3.45})));
        }
    }
}
